import { useEffect, useState } from "react";
import RuleSettingsDrawer from "./RuleSettingsDrawer";
import GoodsListModal from "@/pages/GoodsModule/combinationGoods/component/GoodsListModal";
import BatchModifyQuantityModal from "./BatchModifyQuantityModal";
import CreatSuccessModal from "./CreatSuccessModal";

export const DialogEnum = {
	// 采购规则设置
	RuleSettings: "RuleSettings",
	// 新增商品
	GoodsList: "GoodsList",
	// 批量修改数量
	BatchModifyQuantity: "BatchModifyQuantity",
	// 创建成功采购单提示弹窗
	CreatSuccess: "CreatSuccess"
};

const Actions = props => {
	return (
		<>
			{props.actionName === DialogEnum.GoodsList && (
				<GoodsListModal {...props} isExactMatch={1} memberPricedisabled={true} defaultNum={1} />
			)}
			<RuleSettingsDrawer {...props} />
			<BatchModifyQuantityModal {...props} />
			<CreatSuccessModal {...props} />
		</>
	);
};
export default Actions;
